﻿<%@ Page Title="Experiment Details" Language="C#" MasterPageFile="~/MasterPage.master"
     AutoEventWireup="true" CodeFile="Details.aspx.cs" Inherits="Details" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CphMaster" runat="Server">
     <h1 class="pagetitlesystem">
          <asp:Literal ID="lblTitle" runat="server" meta:resourcekey="lblTitleResource1"
               Text="Experiment Details" /></h1>
     <%-- General Data--%>
     <asp:SqlDataSource ID="genDataSource" runat="server" ConnectionString="DSN=NMRExperimentDB;"
          ProviderName="System.Data.Odbc" SelectCommand="SELECT expid AS Id, expname AS Name, expdim AS Dimentionality, DATE(expdate) AS `Date`, expmemo AS `Short Description`, expContent AS Content
FROM experiments
WHERE expid=1"></asp:SqlDataSource>
     <asp:DataList ID="DataList2" runat="server" DataSourceID="genDataSource"
          Width="400px" CellPadding="4" ForeColor="#333333">
          <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
          <AlternatingItemStyle BackColor="White" />
          <ItemStyle BackColor="#EFF3FB" />
          <SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
          <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
          <ItemTemplate>
               Id:
               <asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
               <br />
               Name:
               <asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' />
               <br />
               Dimentionality:
               <asp:Label ID="DimentionalityLabel" runat="server" Text='<%# Eval("Dimentionality") %>' />
               <br />
               Date:
               <asp:Label ID="DateLabel" runat="server" Text='<%# Eval("Date") %>' />
               <br />
               Short Description:
               <asp:Label ID="Short_DescriptionLabel" runat="server" Text='<%# Eval("[Short Description]") %>' />
               <br />
               Content:
               <asp:TextBox ID="ContentLabel" runat="server" Style="background-color: inherit"
                    Text='<%# Eval("Content") %>' TextMode="MultiLine" Rows="15"
                    Columns="100" />
               <br />
               <br />
          </ItemTemplate>
     </asp:DataList>
     <%-- CPD Data --%>
     <asp:SqlDataSource ID="cpdDataSource" runat="server" ConnectionString="DSN=NMRExperimentDB;"
          ProviderName="System.Data.Odbc" SelectCommand="SELECT cpdid AS Id, cpdname AS `File Name`, DATE(cpdDate) AS `Date`, cpdMemo AS `Short Description`, cpdContent AS Content
FROM experiments AS exp, cpd AS c, expcpd AS ec
WHERE expid=1 AND exp.expid=ec.`expid-fk1` AND c.cpdid=ec.`cpdid-fk2`">
     </asp:SqlDataSource>
     <asp:DataList ID="DataList1" runat="server" CellPadding="3" DataSourceID="cpdDataSource"
          ForeColor="Black" BackColor="White" BorderColor="#999999"
          BorderStyle="Solid" BorderWidth="0px" GridLines="Both" RepeatColumns="1"
          Width="400px" Font-Bold="False" Font-Italic="False" Font-Overline="False"
          Font-Strikeout="False" Font-Underline="False">
          <FooterStyle BackColor="#CCCCCC" />
          <AlternatingItemStyle BackColor="#CCCCCC" />
          <ItemStyle Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
               Font-Underline="False" />
          <SelectedItemStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
          <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
          <ItemTemplate>
               Id:
               <asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
               <br />
               File Name:
               <asp:Label ID="File_NameLabel" runat="server" Text='<%# Eval("[File Name]") %>' />
               <br />
               Date:
               <asp:Label ID="DateLabel" runat="server" Text='<%# Eval("Date") %>' />
               <br />
               Short Description:
               <asp:Label ID="Short_DescriptionLabel" runat="server" Text='<%# Eval("[Short Description]") %>' />
               <br />
               Content:
               <asp:TextBox ID="ContentLabel" runat="server" Text='<%# Eval("Content") %>'
                    ReadOnly="True" TextMode="MultiLine" Rows="15" Columns="100"
                    Style="background-color: inherit" BorderWidth="1px" Font-Italic="False" />
               <br />
               <br />
          </ItemTemplate>
     </asp:DataList>
     <br />
     <br />
     <br />
</asp:Content>
